<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>奖品列表</title>
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/dpl.css" rel="stylesheet">
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/bui.css" rel="stylesheet">
<script src="http://g.tbcdn.cn/fi/bui/jquery-1.8.1.min.js"></script>
<script src="http://g.alicdn.com/bui/seajs/2.3.0/sea.js"></script>
<script src="http://g.alicdn.com/bui/bui/1.1.10/config.js"></script>
<script src="/assets/kxdr/gift.js"></script>
<script src="/assets/shopmanage/global_menu_jquery.js"></script>
</head>
<body style="width:990px;margin:0 auto;padding:10px 0;">

 <div class="doc-content">
    <div class="panel">
      <div class="panel-body">
	  <div class="row">
		<div class="span24 doc-content">
		<h3 class="pull-left">{$L.APP_HOME} >> 奖品池</h3>
		
	<div class="button-group pull-right">
	  {include file='../../../PublicView/global_menu.html'}
    </div>
		</div>
	  </div>
	  <hr />
	  <div class="button-group ">
		  <button class="button js-addgift"><i class="icon-pencil"></i>添加奖品</button>
		  <!-- <a class="button"><i class="icon-user"></i>中奖用户</a> -->
		  {if $trash}
		  <a class="button button-success" href="/?m=Kxdr&c=Gift&a=Index&tp={$curtp}"><i class="icon-th-list icon-white"></i>列表</a>
		  {else}
		  <a class="button" href="/?m=Kxdr&c=Gift&a=Index&tp={$curtp}&trash=1"><i class="icon-trash"></i>回收站</a>
		  {/if}
	  </div>
	  <hr />
	  		<div id="tab" class="bui-tab-panel bui-tab nav-tabs" aria-disabled="false" aria-pressed="false">
				<ul style="font-size:14px">
				  <li class="bui-tab-panel-item {if !$curtp}active{/if} bui-tab-item" aria-disabled="false" aria-pressed="false"><a href="/?m=Kxdr&c=Gift&trash={$trash}">{if $trash && !$curtp}<i class="icon-trash"></i>{/if}所有类型</a></li>
				  {foreach from=$gift_type item=item} 
				  <li class="bui-tab-panel-item {if $curtp==$item.id}active{/if} bui-tab-item" aria-disabled="false"><a href="/?m=Kxdr&c=Gift&tp={$item.id}&trash={$trash}">{if $trash && $curtp==$item.id}<i class="icon-trash"></i>{/if}{$item.name}</a></li>
				  {/foreach}
				  <li class="pull-right "><form method="post" action="/?m=Kxdr&c=Gift"><input type="hidden" name="tp" value="{$curtp}" /><input type="hidden" name="trash" value="{$trash}" /><input name="q" type="text" class=" input " value="{$q|default:""}" data-tip="{ldelim}ext : '{$L.APP_SEARTCH}'{rdelim}"/> <button class="button"><i class="icon-search"></i> {$L.APP_SEARTCH}</button></form></li>
				</ul>
			</div>
        <div id="panel" class="span24 " style="min-height:400px;">
			<div class="form-horizontal" id="p2">
	  <div class="row">
  <div class="doc-content">
    <table cellspacing="0" class="table ">
	    <thead>
          <tr>
            <th>奖品名称</th>
            <!-- <th class="span3">等级</th> -->
            <th class="span3">初始数量</th>
            <th class="span3">剩余数量</th>
            <th class="span3">价值</th>
            <th class="span3">奖品类型</th>
          </tr>
        </thead>
		<tbody>
		{foreach from=$gifts item=item key=key}
        <tr>
           <td>{$item.name} 
		   <div class="button-group pull-right">
		   {if !$trash}
			<a href="?m=Kxdr&c=Gift&a=edit&gid={$key}" class="button button-mini  "><i class=" icon-pencil"></i></a>
			<button  class="button button-mini js-remove " data-gid="{$key}"><i class=" icon-remove"></i></button>
		   {else}
			<button  class="button button-mini js-refond " data-gid="{$key}"><i class=" icon-repeat"></i></button>
		   {/if}
		   </div>
		  </td>
          <!-- <td>一等奖</td> -->
          <td>{$item.quantity_initial}件</td>
          <td>{$item.quantity}件</td>
          <td>{if $item.price>0}{$item.price}元{else}--{/if}</td>
          <td>{$item.type_name}</td>
        </tr>
		{/foreach}
      </tbody>
    </table>
    <div>
      <!-- <ul class="toolbar pull-left">
        <li><label class="checkbox"><input type="checkbox"><a href="#">全选</a></label></li>
        <li><button class="button button-danger"><i class="icon-white icon-trash"></i>批量删除</button></li>
        <li><button class="button button-success">审核通过</button></li>
        <li><button class="button button-inverse">审核不通过</button></li>
      </ul> -->
      <div class="pagination pull-right">
	    {$show}
      </div>
    </div>
</div>

      </div>
	  </div></div>
    </div>
  </div>
  
  <div id="content" class="hide">
		<form id="J_Form" class="form-horizontal">
        <div class="row">
          <div class="control-group span15">
            <label class="control-label">奖品主图：</label>
            <div class="controls" style="height:160px">
			  <img class="pull-left js-picview" src="http://img01.taobaocdn.com/imgextra/i1/27390555/TB2CR.eaFXXXXcZXXXXXXXXXXXX-27390555.gif_150x150.jpg" />
			  <input type="hidden" class="js-picurl" name="pic_url" value="{$pic_url|default:"http://img01.taobaocdn.com/imgextra/i1/27390555/TB2CR.eaFXXXXcZXXXXXXXXXXXX-27390555.gif"}" />
				<div class="pull-left" id="J_Uploader">
				</div>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="control-group span15">
            <label class="control-label">奖品名称：</label>
            <div class="controls">
			  <input name="id" type="text" class="pull-left span6 control-text js-giftname" data-rules="{ldelim}required:true{rdelim}" data-msg="请填入奖品名称"   value="">
            </div>
          </div>
        </div>
        <div class="row">
          <div class="control-group span15">
            <label class="control-label">奖品类型：</label>
            <div class="controls">
			  <div id="s6">
				  <input type="hidden" value="b" name="hide" data-msg="请选择奖品类型">
				  <input name="id" type="text" class="input-small control-text js-jplx" style="display:none" value="1">
			  </div>
            </div>
          </div>
        </div>
        <div class="row js-cishu hide">
          <div class="control-group span15">
            <label class="control-label">抽奖次数：</label>
            <div class="controls">
			  <input name="id" type="text" class="pull-left input-small control-text js-lott" value="">次
            </div>
          </div>
        </div>
        <div class="row js-jifen hide">
          <div class="control-group span15">
            <label class="control-label">积分：</label>
            <div class="controls">
			  <input name="id" type="text" class="pull-left input-small control-text js-jf" value="">积分
            </div>
          </div>
        </div>
        <div class="row js-zhekou hide">
          <div class="control-group span15">
            <label class="control-label">超低折扣：</label>
            <div class="controls">
			  <input type="text" class="pull-left input-small control-text js-promoid hide" readonly value="">
			  <input type="hidden" class="pull-left input-small control-text js-tagid " value="">
			  <button class="button button-danger button-small js-get-prom" type="button">选择</button>
            </div>
          </div>
        </div>
        <div class="row js-rongyu hide">
          <div class="control-group span15">
            <label class="control-label">荣誉：</label>
            <div class="controls">
			  <span class="medal"></span>
			  <input name="id"  class="pull-left input-small control-text js-medal_id " type="hidden" value="">
			  <input name="id"  class="pull-left input-small control-text js-medal_name " type="hidden" value="">
			  <input name="id"  class="pull-left input-small control-text js-medal_pic " type="hidden" value="">
			  <button class="button button-danger button-small js-get-metal" type="button" >选择</button>
            </div>
          </div>
        </div>
        <div class="row js-link">
          <div class="control-group span15">
            <label class="control-label">链接：</label>
            <div class="controls">
			  <input name="id" type="text" class="pull-left control-text js-gifturl" value="">
            </div>
          </div>
        </div>
        <div class="row js-jiazhi">
          <div class="control-group span15">
            <label class="control-label">价值：</label>
            <div class="controls">
			  <input name="id" type="text" class="pull-left input-small control-text js-price" value="">元
            </div>
          </div>
        </div>
        <div class="row js-shuliang">
          <div class="control-group span15">
            <label class="control-label">数量：</label>
            <div class="controls">
			  <input name="id" type="text" class="pull-left input-small control-text js-count" value="">件
            </div>
          </div>
        </div>
        <div class="row js-km hide" style="height:120px">
          <div class="control-group span15">
            <label class="control-label">卡密列表：</label>
            <div class="controls">
			  <textarea class="input-large js-kmlist" style="height:100px"></textarea>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="control-group span15">
            <label class="control-label">领取方式：</label>
            <div class="controls">
				<textarea class="input-large js-detail"></textarea>
            </div>
          </div>
        </div>
    </form>
	</div>
</body>
</html>